package com.harvestdiary.other.demo;


import cn.hutool.core.date.ChineseDate;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.List;
import java.util.stream.Collectors;

@Slf4j
public class test {
    public static void main(String[] args) {
        List<String> stringList = List.of("123", "156", "198", "100", "200");

        // 移除所有以 "1" 开头的字符串的开头 "1"
        List<String> modifiedList = stringList.stream()
                .map(s -> s.startsWith("12") ? s.substring(1) : s)
                .toList();

        // 输出结果
        System.out.println("Original List: " + stringList);
        System.out.println("Modified List: " + modifiedList);

    }
}